package sample.reflects;

import java.lang.reflect.Field;

public class HelloAttr {
	public static void main(String[] args) throws Exception {
		Class<?> demo = null;
		Object obj = null;
		demo = Class.forName("sample.reflects.Person3");
		obj = demo.newInstance();
		Field field = demo.getDeclaredField("sex");
		field.setAccessible(true);
		field.set(obj, "man");
		System.out.print(field.get(obj));
	}

}
